import request from '@/utils/request'




//暂定计时
export function suspend(query) {
  return request({
    url: '/mahjong/costs/suspend',
    method: 'get',
    params:query
  })
}

// 查询计费列表
export function changeRemark(query) {
  return request({
    url: '/mahjong/costs/changeTableRemark',
    method: 'post',
    data:query
  })
}

// 查询计费列表
export function selectByMinute(query) {
  return request({
    url: '/mahjong/cost/selectByMinute',
    method: 'get',
    params: query
  })
}
export function selectBysite(query) {
  return request({
    url: '/mahjong/cost/selectBysite',
    method: 'get',
    params: query
  })
}
export function getOpenTableInfo(query) {
  return request({
    url: '/mahjong/costs/getOpenTableInfo/'+query.orderNumber,
    method: 'get'

  })
}
// 查询计费列表
export function deskList(query) {
  return request({
    url: '/mahjong/costs/Index',
    method: 'get',
    params: query
  })
}
export function addShopId(shopId) {
  return request({
    url: '/mahjong/myshops/addShopId/'+shopId,
    method: 'get',
    params: shopId
  })
}
// 查询店铺列表
export function getShopData() {
  return request({
    url: '/mahjong/myshops/list',
    method: 'get'
  })
}
export function getTableList() {
  return request({
    url: '/mahjong/myshops/getTableList',
    method: 'get'
  })
}
// 查询计费列表
export function listCost(query) {
  return request({
    url: '/mahjong/cost/list',
    method: 'get',
    params: query
  })
}

// 查询计费详细
export function getCost(id) {
  return request({
    url: '/mahjong/cost/' + id,
    method: 'get'
  })
}


// 新增计费
export function threeConfig(data) {
  return request({
    url: '/mahjong/cost/threeConfig/'+data,
    method: 'get'
  })
}
export function cancelOpenTable(data) {
  return request({
    url: '/mahjong/costs/cancelOpenTable/'+data,
    method: 'get'
  })
}
export function stopTime(data) {
  return request({
    url: '/mahjong/costs/stopTime/'+data.orderNumber+'/'+data.stopStatus,
    method: 'get'

  })
}
// 新增计费
export function saveThreeConfig(data) {
  return request({
    url: '/mahjong/cost/saveThreeConfig',
    method: 'post',
    data:data
  })
}
export function buyProduct(data) {
  return request({
    url: '/mahjong/costs/buyProduct',
    method: 'post',
    data:data
  })
}

export function openRoomTable(data) {
  return request({
    url: '/mahjong/costs/openRoomTable',
    method: 'post',
    data:data
  })
}

export function overOpenTable(data) {
  return request({
    url: '/mahjong/costs/overOpenTable',
    method: 'post',
    data:data
  })
}
export function changeTable(data) {
  return request({
    url: '/mahjong/costs/changeTable',
    method: 'post',
    data:data
  })
}
// 新增计费
export function addCost(data) {
  return request({
    url: '/mahjong/cost',
    method: 'post',
    data: data
  })
}

// 修改计费
export function updateCost(data) {
  return request({
    url: '/mahjong/cost',
    method: 'put',
    data: data
  })
}

// 删除计费
export function delCost(id) {
  return request({
    url: '/mahjong/cost/' + id,
    method: 'delete'
  })
}

// 导出计费
export function exportCost(query) {
  return request({
    url: '/mahjong/cost/export',
    method: 'get',
    params: query
  })
}


// 导出开桌情况
export function tmpStopDesk(query) {
  return request({
    url: '/mahjong/tablenumber/tmpStopDesk/'+query,
    method: 'get',
    params: query
  })
}

// 查询计费详细
export function mycaclDesk(id) {
  return request({
    url: '/mahjong/costs/caclDesk/' + id,
    method: 'get'
  })
}

// 新增计费
export function updateTableRemark(data) {
  return request({
    url: '/mahjong/costs/update/remark',
    method: 'post',
    data:data
  })
}


